package com.itbaizhan.shopping_common.result;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;

/**
 * 状态枚举类
 */
@Getter
@AllArgsConstructor
public enum CodeEnum {
    // 正常
    SUCCESS(200, "ok"),
    // 系统异常
    SYSTEM_ERROR(500, "系统异常"),
    //业务异常
    PARAMTER_ERROR(601,"参数异常"),
    //添加商品类型异常
    INSERT_GOODS_TYPE_ERROR(602,"3级商品类型不能添加子类型"),
    //删除商品类型异常
    DELETE_GOODS_TYPE_ERROR(603,"不能删除有子类型的商品类型"),
    FILE_UPLOAD_ERROR(604,"上传文件异常"),
    REGISTER_CODE_ERROR(605,"注册验证码错误"),
    REGISTER_REPEAT_PHONE_ERROR(606,"手机号已经注册"),
    REGISTER_REPEAT_USERNAME_ERROR(607,"用户名已经注册"),
    LOGIN_NAME_PASSWORD_ERROR(608,"用户名或密码错误"),
    LOGIN_PHONE_CODE_ERROR(609,"手机号验证码错误"),
    QR_CODE_ERROR(612,"二维码生成异常"),
    CHECK_SIGN_ERROR(613,"签名验证失败"),
    ORDER_STATUS_ERROR(614,"订单状态异常"),
    SECKILL_GOODS_STOCK_ERROR(615,"秒杀商品库存不足")
    ;
    private Integer code;
    private String message;
}
